#!/bin/bash

showcommands(){
echo -e "qcom \t mode:1" 
echo -e "mtk(天玑2000及以前) \t mode:2" 
echo -e "mtk(天玑2000及以后) \t mode:3" 
}

showcommands

read -p "请输入mode: " cpuid

case $cpuid in
1)
while true; do adb shell cat /sys/class/kgsl/kgsl-3d0/devfreq/cur_freq; done
    ;;

2)
adb shell "while true;do cat /sys/kernel/ged/hal/current_freqency ;done;"
    ;;

3)
adb shell "while true;do cat /sys/kernel/ged/hal/current_freqency ;done;"
    ;;

esac
